package org.dromara.oce.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.math.BigDecimal;
import java.time.LocalDateTime;


/**
 * @desc:
 * @autor: hhl
 * @date: 2025-05-19 15:28:23<br>
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("oce_advertiser_data_analysis")
public class OceAdvertiserDataAnalysis extends Model<OceAdvertiserDataAnalysis> {

    //广告主每日数据分析记录id")
    @TableId(value = "advertiser_analysis_id",type = IdType.AUTO)
    private Long advertiserAnalysisId;

    //推广链接id")
    private Long referralLinkId;

    //推广链接类型：1-袋鼠；2-番茄；3-点众；4-番茄IAA；5-袋鼠IAA；6-端原生IAP；7-端原生IAA；")
    private Integer referralLinkType;

    //巨量应用平台编码")
    private String thirdAdvertiserAppCode;

    //第三方广告主id")
    private String thirdAdvertiserId;

    //第三方广告主名称")
    private String thirdAdvertiserName;

    //当日时间戳")
    private Long thatdayTimestamp;

    //当日日期")
    private String thatdayDate;

    /**
     * 维度编码
     */
    private String dimensionsType;
    /**
     * 维度名称
     */
    private String dimensionsName;

    //短剧名称")
    private String dramaTitle;

    //总消耗")
    private BigDecimal statCost = BigDecimal.ZERO;

    //展示数")
    private Integer showCnt = 0;

    //平均千次展现费用=总花费/展示数*1000")
    private BigDecimal cpmPlatform = BigDecimal.ZERO;

    //点击数")
    private Integer clickCnt = 0;

    //平均点击单价=总花费/点击数")
    private BigDecimal cpcPlatform = BigDecimal.ZERO;

    //点击率=点击数/展示数*100%")
    private BigDecimal ctr = BigDecimal.ZERO;

    //转化数=付费数*回传率")
    private Integer convertCnt = 0;

    //转化成本")
    private BigDecimal conversionCost = BigDecimal.ZERO;

    //转化率=转化数/点击数*100%")
    private BigDecimal conversionRate = BigDecimal.ZERO;

    //激活数")
    private Integer active = 0;

    //激活成本=总消耗/激活数")
    private BigDecimal activeCost = BigDecimal.ZERO;

    //激活率=激活数/点击数*100%")
    private BigDecimal activeRate = BigDecimal.ZERO;

    //首次付费数")
    private Integer activePay = 0;

    //首次付费成本=消耗/付费次数")
    private BigDecimal activePayCost = BigDecimal.ZERO;

    //首次付费率=首次付费数/激活数")
    private BigDecimal activePayRate = BigDecimal.ZERO;

    //付费次数")
    private Integer gamePayCount = 0;

    //付费成本=消耗/付费次数")
    private BigDecimal gamePayCost = BigDecimal.ZERO;

    //投手名称")
    private String createName;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    //创建者")
    private String createBy;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    //创建时间")
    private LocalDateTime createTime;

}
